package gui.tools;

import java.awt.Cursor;
import java.awt.Point;
import java.awt.Toolkit;

import javax.swing.ImageIcon;

import tools.PencilTool;

public class PencilToolItem extends ToolItem {

	public PencilToolItem(){
		super(new PencilTool());
		
		this.setPropertiesEditor(new PencilToolSetup((PencilTool)this.getTool()));
		
		this.setName("pencil");
		
		this.setTooltip("Desenho com lapis");
		
		ImageIcon icon = new ImageIcon(PencilToolItem.class.getResource("/imagens/pencil_16x16.png"));
	
		Toolkit toolkit = Toolkit.getDefaultToolkit();
		
		Cursor c = toolkit.createCustomCursor(
				icon.getImage(),
				new Point(0, 15) , 
				"pencil");
		
		((PencilTool)this.getTool()).setCursor(c);
		
		this.setIcon(icon);
	}
}
